//
//  JTViewCreater.h
//  XJLiver
//
//  Created by Jingjing liu on 2020/6/6.
//  Copyright © 2020 杨俊涛. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface JTViewCreater : NSObject

/**
 快速创建view
 */
+ (UIView *)createViewWithBackgroundColor:(UIColor *)backgroundColor;


/**
 快速创建label
 */
+ (UILabel *)createLabelWithTextColor:(UIColor *)textColor textAlignment:(NSTextAlignment)textAlignment font:(UIFont *)font;


/**
 快速创建button
 */
+ (UIButton *)createButtonWithTitle:(NSString *)title font:(UIFont *)font textColor:(UIColor *)textColor image:(UIImage *)image;


/**
 快速创建裁剪模式的imageView
 */
+ (UIImageView *)createClipImageView;


/**
 快速创建拉伸模式的imageView
 */
+ (UIImageView *)createScaleImageView;


/**
 快速创建scrollView
 */
+ (UIScrollView *)createScrollViewWithDelegate:(id<UIScrollViewDelegate>)delegate contentSize:(CGSize)contentSize pagingEnabled:(BOOL)pagingEnabled;

/**
 快速创建tableView
 */
+ (UITableView *)createTableViewWithDelegate:(id<UITableViewDelegate,UITableViewDataSource>)delegate style:(UITableViewStyle )style;


/**
 快速创建collectionView
 */
+ (UICollectionView *)createCollectionViewWithFlowLayout:(UICollectionViewFlowLayout *)layout delegate:(id<UICollectionViewDelegate,UICollectionViewDataSource>)delegate cell:(Class)cellClass;


/**
 创建gradientLayer
 */
+ (CAGradientLayer *)createGradientLayer:(CGRect )layerFrame startColor:(UIColor *)startColor endColor:(UIColor *)endColor cornerRadius:(CGFloat )radius;


/**
 快速给视图添加圆角 阴影
 */
+ (void)createView:(UIView *)shadowView shadowColor:(UIColor *)shadowColor shadowOffset:(CGSize)offsetSize shadowRadius:(CGFloat)radius alpha:(CGFloat )alpha;


/**
 增加圆角
 */
+ (void)createViewLayer:(UIView *)layer cornerRadius:(CGFloat)radius;

@end

NS_ASSUME_NONNULL_END
